4D Chart v13CT INSERT FIELD |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Chart v13
CT INSERT FIELD
CT INSERT FIELD
The CT INSERT FIELD command inserts a field reference into the text object in area described by scope.
If the object described by scope is not a text object, CT INSERT FIELD does nothing. first and last determine where the reference is inserted. first is one less than the first character position to be replaced and last is the last character position to be replaced. If first equals last, no characters are replaced and the reference is inserted between first and first +1. If last is greater than the number of characters in the text object, CT INSERT FIELD replaces characters from first to the last character in the text object. table and field determine which field is referenced. table is the number of the table and field is the number of the field. Tables and fields are numbered in the order in which they were created. The optional format parameter is the display format for the reference. This option is equivalent to choosing a format from the Format dialog box. Formats are referred to by either their number or their name. Formats are numbered in the order in which they appear in the list of the Format dialog box. If format is a one- or two-digit string, then the format applied to field is from the list. If format is not a one- or two-digit string, then it is compared to the text values of each format in the list. If it matches one of the values in the list, that format is applied. This means that you can refer to the first date format as either “19” or “Short”. If format is not in the list of formats, it is interpreted as a custom numeric format. If format is inappropriate for the resulting value of the reference, it is ignored. For instance, if you use a date format on a number, the number appears unformatted. This example inserts a reference to the first field of the first table into the text object that has an ID of 1, replacing any text in the object, and then formats it according to the eleventh format in the list. CT INSERT FIELD(Area;1;0;32000;1;1;"11") You can use 4D’s Field and Table functions to determine a field or table’s number. This can make your code easier to read. For example, if the field used in the previous example is [Customers]Name, the code would look like this: CT INSERT FIELD(Area;1;0;32000;Table(->[Customers]);Field(->Name);"11") |
PROPERTIES
Product: 4D Chart
INDEX HISTORY
Created: 4D Chart 1 SEE ALSO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||